package org.example.crm.dao;

import org.apache.ibatis.annotations.Mapper;
import org.example.crm.base.BaseMapper;
import org.example.crm.model.Role;
import org.example.crm.query.RoleQuery;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface RoleMapper extends BaseMapper<Role, Integer> {

    List<Map<String, Object>> queryAllRoles(Integer userId);

    Map<String, Object> queryRolesByParmsForTables(RoleQuery roleQuery);

    Role selectByRoleName(String roleName);

    Integer delete(Integer roleId);
}